//
//  ViewController.m
//  XMLParser
//
//  Created by WSXiong on 2017/7/12.
//  Copyright © 2017年 CMCC_CMSZ. All rights reserved.
//

#import "ViewController.h"
#import "ParserXML.h"

@interface ViewController ()

@end

@implementation ViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    NSString *xmlStr = @"<Body><OrderNo>00692017071214482961870758946632</OrderNo><ResultCode>014A17</ResultCode><ResultDesc>订单未支付（等待用户支付）</ResultDesc><PaymentType>ALIPAY-MOBILE</PaymentType><PayURL>https://mapi.alipay.com/gateway.do</PayURL><Parameters><![CDATA[_input_charset=utf-8&body=20170712|10201707121503278945305549135329|ALIPAY-MOBILE|充值&notify_url=http://59.40.182.77:8080/payprod-pay-front-boot/payprod/aliPayResultNotify&out_trade_no=00692017071214482961870758946632&partner=2088811967573425&payment_type=1&seller_id=2088811967573425&service=mobile.securitypay.pay&subject=在线支付充值&total_fee=0.01&sign=IEkGnTDTbTYNfRGH9xmCmk7rI6U1JX2RBxoK5%2BehOPqrhcztUrl%2BWMC6J%2FAiSpzoR7oH2LRnAAzS7pfTyQFySz4WovuXxLxitK8J3HyB%2FPPXCBraszAYqFKkS75w0Axy4Y9WF%2F5v0j4dtrjwW5VLgin7huz7q5f9koIOmjayC20%3D&sign_type=RSA]]></Parameters></Body>";
    ParserXML *parser = [[ParserXML alloc]init];
    [parser createPayment:xmlStr andViewController:self andAppUrlScheme:@"xx"withCompletion:^(id response) {
        NSLog(@"%@",response);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
